package com.lelouch.param;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * 部门参数实体
 *
 * @author lcy
 * @create 2018-06-12 14:50
 */
@Setter
@Getter
@ToString
public class DeptParam {
    private Integer id;

    @NotNull(message = "部门名称不可以为空")
    @Length(max = 15, min = 2, message = "部门名称长度要在2-15之间")
    private String name;

    //默认为0，防止前天查询的时候未传值
    private Integer parentId = 0;

    @NotNull(message = "序列数不可以为空")
    private Integer seq;
    @NotBlank(message = "备注不能为空")
    @Length(max = 255, message = "备注的长度不要大于255个字符")
    private String remark;

}
